<%@page import="com.dfhc.wk.workflownodeconfig.IWorkflowNodeConfigConstants" %>
<%@page import="com.dfhc.util.StringHelper"%>
<%@page import="com.dfhc.util.CryptoHelper"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />

<!-- 全局js 和css包 -->
<%@ include file="/jsp/include/web/new/global.jsp" %>
<title>添加前台工作流节点配置 </title>

<%@ taglib uri="/dfhc" prefix="dfhc" %>
</head>
<body>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-wkworkflownodeconfig-add">
	   <input type="hidden" id="id" name="id" value="${bean.id}">
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span><%=IWorkflowNodeConfigConstants.TABLE_COLUMN_DISPLAY.get("name")%>：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.name}" placeholder="" id="name" name="name"/>			
	    </dfhc:div>	    		 
							
	    <dfhc:title templateId="h_ui_label_title_2"><%=IWorkflowNodeConfigConstants.TABLE_COLUMN_DISPLAY.get("remark")%>：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_fromcontrol">			    
<dfhc:textarea name="remark" cols="" rows=""   placeholder="说点什么..."  maxlength="255"   templateId="h_ui_textarea" >${bean.remark}</dfhc:textarea>				
			</dfhc:div>
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><%=IWorkflowNodeConfigConstants.TABLE_COLUMN_DISPLAY.get("nodeType")%>：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.nodeType}" placeholder="" id="nodeType" name="nodeType"/>			
	    </dfhc:div>	    		 
							
	    <dfhc:title templateId="h_ui_label_title_2"><%=IWorkflowNodeConfigConstants.TABLE_COLUMN_DISPLAY.get("showType")%>：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.showType}" placeholder="" id="showType" name="showType"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><%=IWorkflowNodeConfigConstants.TABLE_COLUMN_DISPLAY.get("nodeIcon")%>：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.nodeIcon}" placeholder="" id="nodeIcon" name="nodeIcon"/>			
	    </dfhc:div>	    		 
							
	    <dfhc:title templateId="h_ui_label_title_2"><%=IWorkflowNodeConfigConstants.TABLE_COLUMN_DISPLAY.get("nodeStyle")%>：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.nodeStyle}" placeholder="" id="nodeStyle" name="nodeStyle"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
		<dfhc:div templateId="h_ui_div_row_cl">
			<dfhc:div templateId="h_ui_div_pop_up_button2">
				<dfhc:button templateId="h_ui_submit_button" />
			</dfhc:div>
		</dfhc:div>
	</form>
</article>



<script type="text/javascript">
$(function(){
	//获取新id
	<c:if test="${empty bean}"> 
	$('#id').val(getNewId('wk_workflow_node_config'));
	</c:if>


	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-wkworkflownodeconfig-add").validate({
		rules:{
			name:{			
				required:true,
				minlength:1,
				maxlength:255
			},
			remark:{			
				maxlength:255
			},
			nodeType:{			
				maxlength:255
			},
			showType:{			
				maxlength:255
			},
			nodeIcon:{			
				maxlength:255
			},
			nodeStyle:{			
				maxlength:255
			}
		},
 		messages: {
			name:{
		        required: "请输入节点名称",
		        minlength: "节点名称至少由1个字母组成",
		        maxlength: "节点名称最大长度为255个字母"
	           },
			remark:{
		        maxlength: "备注最大长度为255个字母"
	           },
			nodeType:{
		        maxlength: "节点类型最大长度为255个字母"
	           },
			showType:{
		        maxlength: "显示类型最大长度为255个字母"
	           },
			nodeIcon:{
		        maxlength: "图标最大长度为255个字母"
	           },
			nodeStyle:{
		        maxlength: "样式最大长度为255个字母"
	           }
	    },		
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			<c:if test="${empty bean}"> 
			
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/workflownodeconfig/insert")%>';
			</c:if>
			<c:if test="${not empty bean}"> 
			
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/workflownodeconfig/update")%>';
			</c:if>
			//提交成功关闭
			submitAjax(url,$("#form-wkworkflownodeconfig-add").serialize(), getRootPath()+"/workflownodeconfig"); 		    		    		
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
